<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>文档</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <style type="text/css">
    html,body{
        height: 100%;
    }
    #wrap{
        height: 100%;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-flex-flow: column;
               flex-flow: column;
    }
    
    #main{
        -webkit-box-flex: 1; 
        -webkit-flex: 1;
        flex: 1;
    }
    
    .con{font-size: 28px; text-align: center;}
    </style>
</head>
<body>
    <div id="wrap">
        <header class="aui-bar aui-bar-nav" id="header">
            <a class="aui-btn aui-pull-left" tapmode onclick="closeWin()">
                <span class="aui-iconfont aui-icon-left"></span>
            </a>
            <div class="aui-title">收藏</div>
        </header>
        <div id="main">
                
        </div>

    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function(){
        //适配iOS 7+，Android 4.4+状态栏
        $api.fixStatusBar(header);
        // 打开frame
        function openFrame(name) {
            var header = $api.byId('header');

            var headerPos = $api.offset(header);
            var main = $api.byId('main');
            var mainPos = $api.offset(main);
            api.openFrame({
                name: name,
                url: name+'_frm.html',
                bounces: true,
                rect: {
                    x: 0,
                    y: headerPos.h,
                    w: 'auto',
                    h: mainPos.h
                }
            });
        }
        openFrame('collection');
    };

    // 打开win
    function openWin(name) {
        api.openWin({
            name: name,
            url: name+'_win.html',
        });
    }
    // 关闭win
    function closeWin () {
        api.closeWin();
    }
</script>
</html>